﻿Public Class FrmFind

    Public Caller As FrmMain
    Public Info As FrmMain.FindInfo

    Sub New()
        InitializeComponent()
        CmbNode.SelectedIndex = 1
    End Sub

    Private Sub BtnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnClose.Click
        Close()
    End Sub

    Private Sub BtnFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnFind.Click
        If TxtFind.Text <> Info.Text Then
            Info.Text = TxtFind.Text
            Info.SearchNode = If(CmbNode.SelectedIndex = 0, Caller.Tree.SelectedNode, Nothing)
            Info.LastNode = Info.SearchNode
        End If
        Caller.MnuFindNext.PerformClick()
    End Sub

End Class